InBox GenericRPC
Version 6.3.0
Creation date 2022/03/31
Resources
Custom module to create generic RPC operator for WebService.
Prerequisites
Framework
The following versions of OTRS Framework are supported:
- [6.0.x]
Modules
The following modules are required:
- InBox Core 6.31.8 or superior
Operating System
The following operating systems are required:
- [None]
Software de Terceiros
The following third parties software is required:
- [None]
Installation
bin/otrs.Console.pl Admin::Package::Install /path/to/InBox\ GenericRPC-6.1.0.opm
Configuration
GenericRPC::Core::ModuleMapping
In this configuration it is possible to add new objects and modules to be used by the RPC Operator:
Usability
GenericRPC operator creation
To create an RPC operator, access your WebService: Admin -> WebService
After creating the operator, define a name and save the operator. In this step it is possible to define an input and output mapping of the operator, below, an input mapping module for using GenericRPC:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="RootElement">
<xsl:copy>
<UserLogin><xsl:value-of select="//Login" /></UserLogin>
<Password><xsl:value-of select="//Password" /></Password>
<Execute>
<Object>Kernel::System::Service</Object>
<Method>ServiceGet</Method>
<Parameter>
<Name>ServiceName</Name>
</Parameter>
<Type>HASH</Type>
<Execute>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Esses parametros são todos obrigatorios:
UserLogin: User login for authentication
Password: User password for authentication
# Execute - this block can be sent multiple times to make multiple requests on functions
Object: System object that will be used
Method: Object method that will be used
Parameter: List of parameters that are required in the method, if there are no parameters, send the empty tag
Obs: Remembering that the object must be configured here ###GenericRPC::Core::ModuleMapping
Contact support or consult the documentation for objects and methods that can be added.
Configure the operator route and use the webservice.